using BasicData.API.Dtos;
using BasicData.ErrorCode;
using MediatR;
using System;
using System.ComponentModel.DataAnnotations;

namespace BasicData.API.Application.Command
{
    /// <summary>
    /// 修改生产信息命令
    /// </summary>
    public class UpdateProductionInfoCommand : IRequest<APIResult<ProductionInfoDTO>>
    {
        /// <summary>
        /// 生产信息ID
        /// </summary>
        [Required(ErrorMessage = "生产信息ID不能为空")]
        public Guid Id { get; set; }

        /// <summary>
        /// 生产批次
        /// </summary>
        [Required(ErrorMessage = "生产批次不能为空")]
        [MaxLength(100, ErrorMessage = "生产批次最大长度为100")]
        public string BatchNumber { get; set; }

        /// <summary>
        /// 保质期（天）
        /// </summary>
        [Range(1, int.MaxValue, ErrorMessage = "保质期必须大于0")]
        public int ShelfLifeDays { get; set; }

        /// <summary>
        /// 生产许可证号
        /// </summary>
        [MaxLength(100, ErrorMessage = "生产许可证号最大长度为100")]
        public string ProductionLicenseNumber { get; set; }

        /// <summary>
        /// 生产企业
        /// </summary>
        [MaxLength(200, ErrorMessage = "生产企业最大长度为200")]
        public string ManufacturerName { get; set; }

        /// <summary>
        /// 封面图
        /// </summary>
        [MaxLength(500, ErrorMessage = "封面图URL最大长度为500")]
        public string CoverImageUrl { get; set; }

        /// <summary>
        /// 商品Id
        /// </summary>
        [Required(ErrorMessage = "商品ID不能为空")]
        public int GoodsId { get; set; }

        /// <summary>
        /// 操作人
        /// </summary>
        [Required(ErrorMessage = "操作人不能为空")]
        public string ModifiedBy { get; set; }
    }
} 